-
-
Notifications
You must be signed in to change notification settings - Fork 401
Add Code Action for adding a module to your project's cabal file #4617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
61bf7ee
to
16bef12
Compare
16bef12
to
234cb09
Compare
@VeryMilkyJoe please upgrade to the latest commit of |
c40661e
to
56144e4
Compare
Done and all tests that matter are green :) |
56144e4
to
6a950f1
Compare
c93ce2a
to
47a6dca
Compare
plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/CabalAdd/Command.hs
Outdated
Show resolved
Hide resolved
plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/CabalAdd/Types.hs
Outdated
Show resolved
Hide resolved
plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/CabalAdd/Types.hs
Outdated
Show resolved
Hide resolved
In my opinion, this is in a merge ready state, unless anyone wants to look over it again 🙃 @fendor? |
47a6dca
to
0a2f28d
Compare
For diagnostics complaining about the current module being unknown, we now offer code actions to add the module to any possible field in the responsible cabal file. Additionally, refactor the cabal-plugin into smaller modules and refactor the add-package feature to have some shared functions to be used for both add-package and add-module.
0a2f28d
to
20759b0
Compare
For diagnostics complaining about the current haskell module being unknown, we now offer all possible code actions to add the module to a field in the responsible cabal file.
Additionally, this PR refactors the cabal-plugin into smaller modules and also refactors the add-package feature to have some shared functions to be used for both add-package and add-module.
Thank you to @Bodigrim for the changes in
cabal-add
that made it possible to implement this feature without a huge amount of pain!Screencast.From.2025-06-07.17-49-54.mp4